<template>
  <div>
    <a-card v-for="item in data" :key="item.id">
      <a-descriptions :title="item.name">
        <a-descriptions-item label="性别">
          <span v-show="(item.sex = 0)">男</span>
          <span v-show="(item.sex = 1)">女</span>
        </a-descriptions-item>
        <a-descriptions-item label="年龄">
          {{ item.age }}
        </a-descriptions-item>
        <a-descriptions-item label="手机号">
          {{ item.phone }}
        </a-descriptions-item>
        <a-descriptions-item label="课程">
          {{ item.curriculum }}
        </a-descriptions-item>
      </a-descriptions>
    </a-card>
  </div>
</template>


<script>
import { getTeacherList } from "@/utils/api";
export default {
  name: "TeachersOfClass",
  components: {},
  data() {
    return {
      data: [],
      teacher: ""
    };
  },
  created() {
    const params = new URLSearchParams();
    params.append("teacher", this.$store.state.userinfo.tno);
    getTeacherList(params).then((res) => {
      this.data = res.data;
    });
  },
  methods: {},
};
</script>
<style>
</style>